//
//  MessageModelManager.m
//  SpeedDating
//
//  Created by ISU1 on 17/1/4.
//  Copyright © 2017年 isu. All rights reserved.
//

#import "MessageModelManager.h"

@implementation MessageModelManager

@end

@implementation HRLikeMeModel

+ (HRLikeMeModel *)getLikeMeModelWithDictionary:(NSDictionary *)dic {
    HRLikeMeModel *res = [HRLikeMeModel new];
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end

@implementation HRNewFriendModel

+ (HRNewFriendModel *)getNewFriendModelWithDictionary:(NSDictionary *)dic {
    HRNewFriendModel *res = [HRNewFriendModel new];
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end

@implementation HRTimeLineModel

+ (NSString *)replacePropertyForKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        return @"ID";
    }
    return key;
}

+ (HRTimeLineModel *)getTimeLineModelWithDictionary:(NSDictionary *)dic {
    
    HRTimeLineModel *res = [HRTimeLineModel new];
    
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end

//extern const CGFloat contentLabelFontSize;
//
//extern CGFloat maxContentLabelHeight;

@implementation Active

@synthesize content = _content;

+ (NSDictionary *)objectClassInArray{
    return @{@"commentList" : [Commentlist class], @"praiseList" : [Praiselist class]};
}

+ (Active *)getActiveWithDictionary:(NSDictionary *)dic {
    Active *res = [Active new];
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

- (void)setContent:(NSString *)content {
    _content = content;
}

//- (NSString *)msgContent {
//    CGFloat contentW = [UIScreen mainScreen].bounds.size.width - 70;
//    CGRect textRect = [_content boundingRectWithSize:CGSizeMake(contentW, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:contentLabelFontSize]} context:nil];
//    if (textRect.size.height > maxContentLabelHeight) {
//        _shouldShowMoreButton = YES;
//    } else {
//        _shouldShowMoreButton = NO;
//    }
//    return _content;
//}

- (void)setIsOpening:(BOOL)isOpening {
    if (!_shouldShowMoreButton) {
        _isOpening = NO;
    } else {
        _isOpening = isOpening;
    }
}

@end


@implementation Commentlist

+ (NSString *)replacePropertyForKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        return @"ID";
    }
    return key;
}

+ (Commentlist *)getCommentlistWithDictionary:(NSDictionary *)dic {
    Commentlist *res = [Commentlist new];
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end


@implementation Praiselist

+ (Praiselist *)getPraiselistWithDictionary:(NSDictionary *)dic {
    Praiselist *res = [Praiselist new];
    [res setValuesForKeysWithDictionary:dic];
    return res;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
}

@end


